<?php
/**
 * Smart Library - Smart Framework
 * http://smart-framework.highet.eu
 *
 * @category   SmartL
 * @package    SmartL_DataBinder
 * @subpackage DataAdapter
 * @copyright  Copyright (c) 2005-2008 Smart Framework team - Stepan Sindelar, Vojtech Vit
 * @license    http://www.opensource.org/licenses/bsd-license.php	New BSD License
 */

/**
 * @see SmartL_DataBinder_DataAdapter_Interface
 */
require_once 'SmartL/DataBinder/DataAdapter/Interface.php';

/**
 * Abstract class for DataAdapters.
 *
 * It implements methods getObject and setObject.
 * 
 * @package SmartL_DataBinder
 * @subpackage DataAdapter
 */
abstract class SmartL_DataBinder_DataAdapter_Abstract implements SmartL_DataBinder_DataAdapter_Interface {
	private $_object = null;
	
	/**
	 * @param mixed $object
	 */
	public function setObject(&$object) {
		$this->_object = &$object;
	}
	/**
	 * @return mixed
	 */
	public function &getObject() {
		return $this->_object;
	}
	
	/**
	 * @param mixed $name Databinding rule.
	 * @param mixed $value
	 */
	public function set($name, $value) {
	}
	public function get($name) {
		return null;
	}
	
	/**
	 * For pre-update logic called in SmartL_DataBinder.
	 */
	public function preUpdate() {
	}
	/**
	 * For post-update logic called in SmartL_DataBinder.
	 */
	public function postUpdate() {
	}
}
